-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add explicit type #3816
add explicit type #3816
Conversation
764f566
to
1a07945
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Just one question.
@@ -1223,7 +1223,7 @@ private[effect] trait ResourceHOInstances0 extends ResourceHOInstances1 { | |||
implicit def catsEffectAsyncForResource[F[_]](implicit F0: Async[F]): Async[Resource[F, *]] = | |||
new ResourceAsync[F] { | |||
def F = F0 | |||
override def applicative = this | |||
override def applicative: ResourceAsync[F] = this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if it matters, but can this be:
override def applicative: ResourceAsync[F] = this | |
override def applicative: Async[Resource[F, *]] = this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typelevel/cats-effect/kernel/shared/src/main/scala/cats/effect/kernel/Resource.scala:1226:20: incompatible type in overriding
[error] override def applicative: cats.effect.kernel.ResourceAsync[F] (defined in class ResourceAsync);
[error] found : cats.effect.kernel.Async[[β$26$]cats.effect.kernel.Resource[F,β$26$]]
[error] required: cats.effect.kernel.ResourceAsync[F]
[error] override def applicative: Async[Resource[F, *]] = this
[error] ^
[error] one error found
[error] (Compile / compileIncremental) Compilation failed
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I was surprised some of the other ones could use the more general type. 🤔
prepare Scala 2.13.12
-Xsource:3
as fatal warnings, not errors;-Xmigration
turns off erroring scala/scala#10439